Conversation
|
|
||
| (ert-deftest hywiki-tests--wikiword-identified-in-emacs-lisp-mode () | ||
| "Verify WikiWord is identified when surrounded by delimiters in `emacs-lisp-mode'." | ||
| :expected-result :failed |
There was a problem hiding this comment.
This is the test case that fails.
With hywiki-mode :all and WikiWord page created this in emacs-lisp-mode below
;; [[WikiWord]]
There WikiWord is not highlighted but hywiki-word-at says it is a WikiWord. Is that the expected behavior? It seems wrong. It can be reproduced manually.
Ideally tests with or without face check should behave the same.
test/hywiki-tests.el
Outdated
| "Choose what test to perform based on value of `hywiki-tests--with-face-test'." | ||
| (let* ((range (hywiki-word-at :range))) | ||
| (when (hywiki-get-referent (car range)) | ||
| (when (and range hywiki-tests--with-face-test) |
There was a problem hiding this comment.
The range check is not needed here since we must have a range for hywiki-get-referent to be non nil.
Removed it since I had to rebase.
| (when (and range hywiki-tests--with-face-test) | ||
| (save-excursion | ||
| (goto-char (round (/ (+ (cadr range) (caddr range)) 2.0))) | ||
| (should (equal range (hywiki-highlighted-word-at :range))))) |
There was a problem hiding this comment.
Here we verify that the highlighted range is the same as what is returned by hywiki-word-at. Point is though adjusted to be within the range since hywiki-word-at does accept point to be outside of the range and still finds the wikiword.
|
Closed for rework! ;-) |
What
Request to merge on master branch instead of rsw. Should be same as
#849 (after rebase with rsw at the time) with an update of the ChangeLog.
Why
rsw branch was merged to master so work continues here.
Includes further improvements. More tests are working now.
I also rolled back to the previous version of
hywiki-tests--word-atand changed it so that if
hywiki-word-atfinds a wikiword then if we testhighlighting
hywiki-highligted-word-atmust also find a wikiword.So that not missing highlighting indicates there is no wikiword.
That rollback causes a test to fail. I think this points to a problem
in hywiki rather than in the test, I can reproduce manually,
so I have marked it as expected failed.